<?php
/*=======================================================================
 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
 =======================================================================*/
global $prefix, $db;
	
	//get username
	$user = $_GET['username'];
	//get the path where the images are stored
	$config = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_upload_config"));
	$sql = $db->sql_query("SELECT * FROM ".$prefix."_upload WHERE username='".$user."'");
	while($result = $db->sql_fetchrow())
	{
		$image = $config['path'].$result['img'];
		unlink($image);
		$db->sql_query("DELETE FROM ".$prefix."_upload WHERE username='".$user."'") or die(mysql_error());
	}
	redirect("admin.php?op=Uploaduserdetail&amp;username=".$user."");
 ?>